package com.sk.action;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sk.dao.OrderDao;



public final class OrderAction {
private static final long serialVersionUID = 1L;
	
	public void OrderServlet() {
	
	}

	/**
	 * Destruction of the servlet. <br>
	 */
	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		// Put your code here
	}

	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doPost(request,response);
		
	}

	
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		OrderDao orderDao = new OrderDao();
		List<OrderBean> productList = orderDao.getAllOrder();
		request.setAttribute("dataSource", productList);
		request.getRequestDispatcher("pages/manager/order.jsp").forward(
				request, response);
	
	}

	
	public void init() throws ServletException {
		// Put your code here
	}

	public Object getPno() {
		// TODO Auto-generated method stub
		return null;
	}
}
